<!-- Sofija Puric 6/08 -->

<?php
    require '../pages/db.php';
    $con=dbConnect("sib");

    $eventid=$_GET["eventid"];
    $result=mysql_query("SELECT * FROM event WHERE IDEvent='$eventid'", $con);
    $row=mysql_fetch_array($result);

    $name=$row["Name"];
    $location=$row["Location"];
    $date_from=$row["DateFrom"];
    $date_to=$row["DateTo"];
    $brief=$row["BriefDescription"];
    $full=$row["FullDescription"];
    $link=$row["Link"];
    $url=$row["Url"];
    $alt=$row["Alt"];

echo '
<div class="admin-events">
    <div class="admin-title">
        <h1>Edit Event</h1>
    </div>

    <div class="admin-content">
        <form name="add-event" action="pages/add_admin_event-edit.php?eventid='.$eventid.'" method ="post">
            <table align="center">
            <tr>
                <td>Name: </td>
                <td><input type="text" name="name" value="'.$name.'" /></td>
            </tr>

            <tr>
                <td>Location: </td>
                <td><input type="text" name="location" value="'.$location.'" /></td>
            </tr>

            <tr>
                <td>Date from: </td>
                <td><input type="text" name="date_from" value="'.$date_from.'" /></td>
            </tr>

            <tr>
                <td>Date to: </td>
                <td><input type="text" name="date_to" value="'.$date_to.'" /></td>
            </tr>

            <tr>
                <td>Link: </td>
                <td><input type="text" name="link" value="'.$link.'" /></td>
            </tr>

            <tr>
                <td>Url of event picture: </td>
                <td><input type="text" name="url" value="'.$url.'" /></td>
            </tr>

            <tr>
                <td>Alt of event picture: </td>
                <td><input type="text" name="alt" value="'.$alt.'" /></td>
            </tr>

            <tr>
                <td colspan="2">Brief Info: </td>
            </tr>
            <tr>
                <td colspan="2"><textarea name="brief" rows="4" cols="50">'.$brief.'</textarea></td>
            </tr>
            <tr>
                <td colspan="2">Full Info: </td>
            </tr>
            <tr>
                <td colspan="2"><textarea name="full" rows="4" cols="50">'.$full.'</textarea></td>
            </tr>
            <tr>
                <td colspan="2" align="center"><button type="Submit" name="submit" >Submit</button></td>
            </tr>

            </table>
        </form>


    </div>
</div>
    ';

mysql_close($con);

    ?>